import request from "@/utils/request";

export default {
    search(storeName){
        return request({
            url: '/users/findByShopName',
            method: 'get',
            params: {
                search: storeName
            }
        })
    },
    searchAll(){
        return request({
            url:'/users/findAllStore',
            method:'get',
        })
    },
    searchStoreDish(id){
        return request({
            url:'/dish/findBySid',
            method:'get',
            params:{
                sid:id
            }
        })
    },
    findType(id){
        return request({
            url:'/dish/findAllDishTypeBySid',
            method:'get',
            params:{
                sid:id
            }
        })
    },
    findByType(id,type){
        return request({
            url:'/dish/findAllByTypeAndUid',
            method:'get',
            params:{
                id:id,
                type:type
            }
        })
    },
    findBySid(id){
        return request({
            url:'/dish/findBySid',
            method:'get',
            params:{
                sid:id
            }
        })
        
    },
    findByEid(id){
        return request({
            url:'/users/findAddressById',
            method:'get',
            params:{
                id:id
            }
        })
        
    },
    subOrder(orderlist){
        return request({
            url:'/order/addAll',
            method:'post',
            data:orderlist
        })
    }
}